import request from '../../utils/request'

// 上传
export function upload(file: object) {
    const formData = new FormData();
    formData.append("file", file);
  return request({
    url: '/material/upload?classify=0',
    method: 'post',
    data: formData,
    headers: {
        "Content-Type": "multipart/form-data",
    },
  })
}

// 分页查询
export function goodsPageList(data: object) {
  return request({
    url: '/goods/pageList',
    method: 'post',
    data: data
  })
}

//新增
export function goodsAddOrUpdate(data: object) {
  return request({
    url: '/goods/addOrUpdate',
    method: 'post',
    data: data
  })
}